﻿<%@ Page MasterPageFile="~/Site.Master" Language="C#" AutoEventWireup="true" CodeBehind="Css.aspx.cs"
    Inherits="Omu.AwesomeWebFormsDemo.Css" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2>
        Lookup with pagination (more results button)
    </h2>
    <o:Lookup runat="server" ID="loko" GetUrl="~/svc/aja.svc/FruitGet" SearchUrl='~/svc/aja.svc/FruitSearch'
        Value="3" CssClass="redb" />
    <h2>
        MultiLookup with pagination (more results button)
    </h2>
    <o:MultiLookup runat="server" ID="Fruits" GetMultipleUrl="~/svc/aja.svc/FruitGetMultiple"
        SearchUrl='~/svc/aja.svc/FruitSearch' SelectedUrl="~/svc/aja.svc/FruitSelected"
        Value='["1","2","3"]' Fullscreen="True" ClearButton="true" CssClass="redb" />
    <h2>
        AjaxDropdown bound to another one by parentId</h2>
    <o:AjaxDropdown runat="server" ID="Categories" Url="~/svc/aja.svc/CategoriesDropdown"
        CssClass="redb"></o:AjaxDropdown>
    =
    <%
        Fruitsadd.ParentId = Categories.ClientID;
    %>
    <o:AjaxDropdown runat="server" ID="Fruitsadd" Url="~/svc/aja.svc/FruitsDropdown">
    </o:AjaxDropdown>
    <h2>
        AjaxDropdown bound to MultiLookup</h2>
    <o:MultiLookup runat="server" ID="Categories2" GetMultipleUrl="~/svc/aja.svc/CategoryGetMultiple"
        SearchUrl='~/svc/aja.svc/CategorySearch' SelectedUrl="~/svc/aja.svc/CategorySelected"
        Value='["1","2","3"]' />
    <%
        FruitsFromMulti.ParentId = Categories2.ClientID;
    %>
    <o:AjaxDropdown runat="server" ID="FruitsFromMulti" Url="~/svc/aja.svc/FruitsFromMultiDropdown">
    </o:AjaxDropdown>
    <h2>
        AjaxDropdown bound to 2 dropdowns
    </h2>
    <o:AjaxDropdown runat="server" ID="Cat1" Url="~/svc/aja.svc/CategoriesDropdown" Value="1">
    </o:AjaxDropdown>
    and
    <o:AjaxDropdown runat="server" ID="Cat2" Url="~/svc/aja.svc/CategoriesDropdown" Value="4">
    </o:AjaxDropdown>
    =
    <%
        FruitsFrom2Cat.Data = new Dictionary<string, string>
                                {
                                    {"c1",Cat1.ClientID},
                                    {"c2",Cat2.ClientID}
                                };
    %>
    <o:AjaxDropdown runat="server" ID="FruitsFrom2Cat" Url="~/svc/aja.svc/FruitsFrom2CatDropdown">
    </o:AjaxDropdown>
    <h2>
        AjaxRadioList bound to another one by parentId</h2>
    <o:AjaxRadioList runat="server" ID="CategoriesArl" Url="~/svc/aja.svc/CategoriesDropdown" CssClass="redb"
        Value="3"></o:AjaxRadioList>
    =
    <%
        FruitsArl.ParentId = CategoriesArl.ClientID;
    %>
    <o:AjaxRadioList runat="server" ID="FruitsArl" Url="~/svc/aja.svc/FruitsList" CssClass="redb"></o:AjaxRadioList>
    <h2>
        AjaxCheckboxList bound to an AjaxCheckboxList and an AjaxDropdown
    </h2>
    <o:AjaxCheckboxList runat="server" ID="Cat1Acl" Url="~/svc/aja.svc/CategoriesCheckboxList" CssClass="redb"
        Value="[1]"></o:AjaxCheckboxList>
    and
    <o:AjaxDropdown runat="server" ID="Cat2Add" Url="~/svc/aja.svc/CategoriesDropdown"
        Value="4"></o:AjaxDropdown>
    =
    <%
        FruitsFrom2CatAcl.Data = new Dictionary<string, string>
                                {
                                    {"c1",Cat1Acl.ClientID},
                                    {"c2",Cat2Add.ClientID}
                                };
    %>
    <o:AjaxCheckboxList runat="server" ID="FruitsFrom2CatAcl" Url="~/svc/aja.svc/FruitsFrom2CatCheckboxList">
    </o:AjaxCheckboxList>
    <h2>
        AjaxList bound to a textbox</h2>
    <asp:TextBox runat="server" ID="Name"></asp:TextBox>
    <input type="button" id="bsearch" value="search" />

    <script type="text/javascript">
        function hi(o) {
            alert('hi the id is ' + o);
        }
    </script>

    <% 
        FruitsList.Buttons = new[]
                              {
                                  new AjaxListButton {Content = "hi", JsFunc = "hi"}
                              };
        FruitsList.Data = new Dictionary<string, string> { { "search", Name.ClientID } };
        FruitsList.SearchButton = "bsearch";
    %>
    <o:AjaxList runat="server" ID="FruitsList" SearchUrl='~/svc/aja.svc/FruitSearch' CssClass="redb" />
</asp:Content>
